﻿using System;
using System.Collections.Generic;
using System.Text;
using MyHotel_BUSWS.MyHotel_PhongDAO_Webservice;
using MyHotel_BUSWS.MyHotel_ThanhToanDAO_Webservice;
using MyHotel_BUSWS.MyHotel_PhieuDichVuDAO_Webservice;
using MyHotel_BUSWS.MyHotel_PhieuThuePhongDAO_Webservice;
using MyHotel_BUSWS.MyHotel_MatHangDAO_Webservice;



namespace MyHotel_BUSWS
{
    public class MHThanhToanBUS
    {
        public static Phong[] getDSPhongDangThue()
        {
            PhongDAOWSSoapClient ws = new PhongDAOWSSoapClient();
            return ws.getDSPhongDangThue();
        }
        public static ThongTinThanhToan getThongTinThanhToan(int maphong)
        {
            ThanhToanDAOWSSoapClient ws = new ThanhToanDAOWSSoapClient();
            return ws.getThongTinThanhToan(maphong);
        }
        public static bool ThanhToanPhong(int maphong, float sotien)
        {
            ThanhToanDAOWSSoapClient ws = new ThanhToanDAOWSSoapClient();
            return (ws.ThanhToanPhong(maphong, sotien) > 1);
        }

        public static PhieuDichVu[] getListDichVuByMaPhong(int maPhong)
        {
            PhieuDichVuDAOWSSoapClient ws = new PhieuDichVuDAOWSSoapClient();
            return ws.getListDichVuByMaPhong(maPhong);
        }

        public static bool themPhieuDichVu(PhieuDichVu phieuDV)
        {

            PhieuDichVuDAOWSSoapClient ws = new PhieuDichVuDAOWSSoapClient();
            return ws.themPhieuDichVu(phieuDV);
        }

        public static PhieuThuePhong getListPhieuThuePhong(int maPhong)
        {
            PhieuThuePhongDAOWSSoapClient ws = new PhieuThuePhongDAOWSSoapClient();
            return ws.getListPhieuThuePhong(maPhong);
        }

        public static bool thanhToanPhong(PhieuThuePhong pthuePhong)
        {
            PhieuThuePhongDAOWSSoapClient ws = new PhieuThuePhongDAOWSSoapClient();
            return ws.suaPhieuThuePhong(pthuePhong);
        }

        public static MatHang[] getListMatHang()
        {
            MatHangDAOWSSoapClient ws = new MatHangDAOWSSoapClient();
            return ws.getListMatHang();
        }
    }
}
